package com.tjp.eight.ui.fragment.personsetting;

import com.tjp.eight.ResultModel;
import com.tjp.eight.utils.SharePreferencesUtils;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import rx.Observable;

/**
 * Created by Administrator on 2017/3/22.
 */
public interface PersonService {
    @Headers({"Content-Type:application/json", "Accept:application/json"})
    @POST("set/myself")
    Observable<PersonModel> loadData(@Body RequestBody body);

    @Multipart
    @Headers({"Accept:application/json"})
    @POST("set/avatar")
    Observable<UploadPicRModel> uploadpic(@Part("uid") String uid, @Part("loginkey") String loginkey, @Part MultipartBody.Part photo);

//    @Multipart
//    @Headers({"Accept:application/json"})
//    @POST("set/avatar")
//    Observable<String> uploadpic(@Part("uid") String uid, @Part("loginkey") String loginkey, @Part MultipartBody.Part photo);

    @Multipart
    @Headers({"Accept:application/json"})
    @POST("set/test")
    Observable<UploadPicRModel> getJson(@Part("uid") String uid, @Part("loginkey") String loginkey, @Part MultipartBody.Part photo);

    @Headers({"Content-Type:application/json", "Accept:application/json"})
    @POST("set/constellation")
    Observable<ResultModel> uploadXingZuo(@Body RequestBody body);

    @Headers({"Content-Type:application/json", "Accept:application/json"})
    @POST("set/gender")
    Observable<ResultModel> modifySex(@Body RequestBody body);

    @Headers({"Content-Type:application/json", "Accept:application/json"})
    @POST("set/bindweixin")
    Observable<ResultModel> bindingwx(@Body RequestBody body);
}
